/**   
* @Title: MyWebAppConfigurer.java
* @Package org.xaoyaoyao.cloud.job.config
* @Description: TODO
* @author xaoyaoyao
* @date Feb 11, 2019 5:01:17 PM
* @version V1.0   
*/
package org.xaoyaoyao.cloud.job.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.xaoyaoyao.cloud.web.config.WebAppConfigurer;

/**
 * @ClassName: MyWebAppConfigurer
 * @Description: TODO
 * @author xaoyaoyao
 * @date Feb 11, 2019 5:01:17 PM
 * 
 */
@Configuration
public class MyWebAppConfigurer extends WebAppConfigurer {

	/** 视图跳转控制器 **/
	@Override
	protected void addViewControllers(ViewControllerRegistry registry) {
		registry.addViewController("/").setViewName("forward:/login.shtml");
	}

	/** 静态资源处理 **/
	@Override
	protected void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/**").addResourceLocations("classpath:/templates/").addResourceLocations("classpath:/static/");
		super.addResourceHandlers(registry);
	}
}
